﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PubSubLite.Messaging
{
    /// <summary>
    /// This interface represents a message channel. All messages within PubSubLite
    /// are forwarded through a message channel.
    /// </summary>
    public interface IMessageChannel
    {
        Guid ID { get; }
        /// <summary>
        /// Puts a message on the channel.
        /// </summary>
        /// <param name="message"></param>
        void Send(IMessageBase message);
        /// <summary>
        /// This event is raised when a message is received.
        /// </summary>
        event EventHandler<MessageReceivedEventArgs> MessageReceived;

    }
}
